<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: aruntime/src/main/java/nars/inference/BudgetFunctions.java Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('de/d4e/BudgetFunctions_8java_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">BudgetFunctions.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../de/d4e/BudgetFunctions_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * BudgetFunctions.java</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (C) 2008  Pei Wang</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * This file is part of Open-NARS.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * Open-NARS is free software; you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * the Free Software Foundation, either version 2 of the License, or</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * Open-NARS is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * along with Open-NARS.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="../../d9/d79/namespacenars_1_1inference.html">   21</a></span>&#160;<span class="keyword">package </span>nars.inference;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.data.BudgetStruct;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../db/dec/namespacenars_1_1entity.html">entity</a>.*;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../d0/d72/namespacenars_1_1language.html">language</a>.*;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../de/ddc/namespacenars_1_1storage.html">storage</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">   31</a></span>&#160;<span class="keyword">public</span> <span class="keyword">final</span> <span class="keyword">class </span><a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">BudgetFunctions</a> <span class="keyword">extends</span> <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions.html">UtilityFunctions</a> {</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="comment">/* ----------------------- Belief evaluation ----------------------- */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">   43</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">float</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> t) {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordtype">float</span> freq = t.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordtype">float</span> conf = t.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a7649e37bb61cac9b8a2601fdff3a5f7a.html#a7649e37bb61cac9b8a2601fdff3a5f7a">aveGeo</a>(conf, Math.abs(freq - 0.5f) + freq * 0.5f);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5c7290e12cda0925b936c07ed7b806f3.html#a5c7290e12cda0925b936c07ed7b806f3">   57</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">float</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5c7290e12cda0925b936c07ed7b806f3.html#a5c7290e12cda0925b936c07ed7b806f3">rankBelief</a>(<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a> judg) {</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordtype">float</span> confidence = judg.<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">getTruth</a>().<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">float</span> originality = 1.0f / (judg.<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_ac0ed749c50e55120d5b63219ed7eb082.html#ac0ed749c50e55120d5b63219ed7eb082">getStamp</a>().<a class="code" href="../../d1/d1e/classnars_1_1entity_1_1Stamp_a316ac8d258c291cb941e50f17c2dc0eb.html#a316ac8d258c291cb941e50f17c2dc0eb">length</a>() + 1);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(confidence, originality);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="comment">     * ----- Functions used both in direct and indirect processing of tasks</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment">     * -----</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ad2933ccc8d786f0cea9d8f561814cbf9.html#ad2933ccc8d786f0cea9d8f561814cbf9">   81</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ad2933ccc8d786f0cea9d8f561814cbf9.html#ad2933ccc8d786f0cea9d8f561814cbf9">solutionEval</a>(<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a> problem, <a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a> solution,</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a> task, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> budget = null;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keywordtype">boolean</span> feedbackToLinks = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordflow">if</span> (task == null) { <span class="comment">// called in continued processing</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            task = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">getCurrentTask</a>();</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            feedbackToLinks = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keywordtype">boolean</span> judgmentTask = task.<a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task_ab140cb553a6cf40b07093d1df283567f.html#ab140cb553a6cf40b07093d1df283567f">getSentence</a>().<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a7d95d60caaf4c895559182a7eb2ff71e.html#a7d95d60caaf4c895559182a7eb2ff71e">isJudgment</a>();</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordtype">float</span> quality = <a class="code" href="../../d4/de9/classnars_1_1inference_1_1LocalRules.html">LocalRules</a>.<a class="code" href="../../d4/de9/classnars_1_1inference_1_1LocalRules_a91eadfda9f647cd8e799b4f982e14fca.html#a91eadfda9f647cd8e799b4f982e14fca">solutionQuality</a>(problem, solution);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordflow">if</span> (judgmentTask) {</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a9324e448bf1bc9f45c3b8e189450a1bf.html#a9324e448bf1bc9f45c3b8e189450a1bf">incPriority</a>(quality);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0.html#aeda0763b2c90f6fef3f23b9b4d3d68f0">setPriority</a>(Math.min(1 - quality, task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>()));</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            budget = <span class="keyword">new</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a>(quality, task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">getDurability</a>(),</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                    <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(solution.<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">getTruth</a>()));</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keywordflow">if</span> (feedbackToLinks) {</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            <a class="code" href="../../d9/d27/classnars_1_1entity_1_1TaskLink.html">TaskLink</a> tLink = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_ab9958cfc601557bc69b0cd9c89f58cf0.html#ab9958cfc601557bc69b0cd9c89f58cf0">getCurrentTaskLink</a>();</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            tLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0.html#aeda0763b2c90f6fef3f23b9b4d3d68f0">setPriority</a>(Math.min(1 - quality, tLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>()));</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            <a class="code" href="../../d4/d8b/classnars_1_1entity_1_1TermLink.html">TermLink</a> bLink = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_afb74806ef37665d392a86dce2e3c6546.html#afb74806ef37665d392a86dce2e3c6546">getCurrentBeliefLink</a>();</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            bLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a9324e448bf1bc9f45c3b8e189450a1bf.html#a9324e448bf1bc9f45c3b8e189450a1bf">incPriority</a>(quality);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        }</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordflow">return</span> budget;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    }</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac5e336432ebc7744461334f04bfd5216.html#ac5e336432ebc7744461334f04bfd5216">  118</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac5e336432ebc7744461334f04bfd5216.html#ac5e336432ebc7744461334f04bfd5216">revise</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> tTruth, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> bTruth,</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth, <span class="keywordtype">boolean</span> feedbackToLinks, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="keywordtype">float</span> difT = truth.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a630c30728ee404b76262610260d0a82a.html#a630c30728ee404b76262610260d0a82a">getExpDifAbs</a>(tTruth);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a> task = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">getCurrentTask</a>();</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_ac83323d74841f32ec33ebb1c374d85cc.html#ac83323d74841f32ec33ebb1c374d85cc">decPriority</a>(1 - difT);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a4761275e8e265c669dc539af3e15eef8.html#a4761275e8e265c669dc539af3e15eef8">decDurability</a>(1 - difT);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keywordflow">if</span> (feedbackToLinks) {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <a class="code" href="../../d9/d27/classnars_1_1entity_1_1TaskLink.html">TaskLink</a> tLink = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_ab9958cfc601557bc69b0cd9c89f58cf0.html#ab9958cfc601557bc69b0cd9c89f58cf0">getCurrentTaskLink</a>();</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            tLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_ac83323d74841f32ec33ebb1c374d85cc.html#ac83323d74841f32ec33ebb1c374d85cc">decPriority</a>(1 - difT);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            tLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a4761275e8e265c669dc539af3e15eef8.html#a4761275e8e265c669dc539af3e15eef8">decDurability</a>(1 - difT);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            <a class="code" href="../../d4/d8b/classnars_1_1entity_1_1TermLink.html">TermLink</a> bLink = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_afb74806ef37665d392a86dce2e3c6546.html#afb74806ef37665d392a86dce2e3c6546">getCurrentBeliefLink</a>();</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            <span class="keywordtype">float</span> difB = truth.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a630c30728ee404b76262610260d0a82a.html#a630c30728ee404b76262610260d0a82a">getExpDifAbs</a>(bTruth);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;            bLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_ac83323d74841f32ec33ebb1c374d85cc.html#ac83323d74841f32ec33ebb1c374d85cc">decPriority</a>(1 - difB);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            bLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a4761275e8e265c669dc539af3e15eef8.html#a4761275e8e265c669dc539af3e15eef8">decDurability</a>(1 - difB);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <span class="keywordtype">float</span> dif = truth.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>()</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                - Math.max(tTruth.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>(), bTruth.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>());</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordtype">float</span> priority = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(dif, task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>());</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordtype">float</span> durability = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(dif, task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">getDurability</a>());</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordtype">float</span> quality = <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(truth);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a>(priority, durability, quality);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    }</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac61e534f9a09e5584eb90c0e915e72ff.html#ac61e534f9a09e5584eb90c0e915e72ff">  150</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac61e534f9a09e5584eb90c0e915e72ff.html#ac61e534f9a09e5584eb90c0e915e72ff">update</a>(<a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a> task, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> bTruth) {</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> tTruth = task.<a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task_ab140cb553a6cf40b07093d1df283567f.html#ab140cb553a6cf40b07093d1df283567f">getSentence</a>().<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">getTruth</a>();</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <span class="keywordtype">float</span> dif = tTruth.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a630c30728ee404b76262610260d0a82a.html#a630c30728ee404b76262610260d0a82a">getExpDifAbs</a>(bTruth);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="keywordtype">float</span> priority = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(dif, task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>());</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keywordtype">float</span> durability = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(dif, task.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">getDurability</a>());</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordtype">float</span> quality = <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(bTruth);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a>(priority, durability, quality);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    }</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="comment">/* ----------------------- Links ----------------------- */</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a9c5299387c81abfc7a7c6fbf72febdc3.html#a9c5299387c81abfc7a7c6fbf72febdc3">  169</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a9c5299387c81abfc7a7c6fbf72febdc3.html#a9c5299387c81abfc7a7c6fbf72febdc3">distributeAmongLinks</a>(BudgetStruct b, <span class="keywordtype">int</span> n) {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordtype">float</span> priority = (float) (b.getPriority() / Math.sqrt(n));</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a>(priority, b.getDurability(), b.getQuality());</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="comment">/* ----------------------- Concept ----------------------- */</span></div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_aabac530761ea7ac0f43f0d1ea8d085c8.html#aabac530761ea7ac0f43f0d1ea8d085c8">  183</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_aabac530761ea7ac0f43f0d1ea8d085c8.html#aabac530761ea7ac0f43f0d1ea8d085c8">activate</a>(<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept.html">Concept</a> concept, BudgetStruct budget) {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <span class="keywordtype">float</span> oldPri = concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>();</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordtype">float</span> priority = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(oldPri, budget.getPriority());</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <span class="keywordtype">float</span> durability = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d.html#a8abd4e228bb1ac62df2efdf4487ff34d">aveAri</a>(concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">getDurability</a>(),</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                budget.getDurability(), oldPri / priority);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordtype">float</span> quality = concept.<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_acf3c7af84e64586a6b1d549f02bfeead.html#acf3c7af84e64586a6b1d549f02bfeead">getQuality</a>();</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0.html#aeda0763b2c90f6fef3f23b9b4d3d68f0">setPriority</a>(priority);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a0f27e5a39dc50b5f108732f59199db22.html#a0f27e5a39dc50b5f108732f59199db22">setDurability</a>(durability);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a686c257308a15eba9458a438cc60227a.html#a686c257308a15eba9458a438cc60227a">setQuality</a>(quality);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="comment">/* ---------------- Bag functions, on all Items ------------------- */</span></div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a7221f4c81db92f40535cffb7f8941b3c.html#a7221f4c81db92f40535cffb7f8941b3c">  211</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a7221f4c81db92f40535cffb7f8941b3c.html#a7221f4c81db92f40535cffb7f8941b3c">forget</a>(BudgetStruct budget, <span class="keywordtype">float</span> forgetRate,</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;            <span class="keywordtype">float</span> relativeThreshold) {</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keywordtype">double</span> quality = budget.getQuality() * relativeThreshold; <span class="comment">// re-scaled</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;                                                                    <span class="comment">// quality</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        <span class="keywordtype">double</span> p = budget.getPriority() - quality; <span class="comment">// priority above quality</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="keywordflow">if</span> (p &gt; 0) {</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            quality += p</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                    * Math.pow(budget.getDurability(), 1.0 / (forgetRate * p));</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        } <span class="comment">// priority Durability</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        budget.setPriority((<span class="keywordtype">float</span>) quality);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    }</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div>
<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a64bec0b466ef31bc3150de23f0623309.html#a64bec0b466ef31bc3150de23f0623309">  232</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a64bec0b466ef31bc3150de23f0623309.html#a64bec0b466ef31bc3150de23f0623309">merge</a>(<a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> baseValue, BudgetStruct adjustValue) {</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        baseValue.<a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_a088e64163126211239b6afd25a9cdca3.html#a088e64163126211239b6afd25a9cdca3">incPriority</a>(adjustValue.getPriority());</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        baseValue.<a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ab72bce41fd8a1512fc8baa07ed93fc1b.html#ab72bce41fd8a1512fc8baa07ed93fc1b">setDurability</a>(Math.max(baseValue.<a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ab0e0dc2172d3fab6390670acb68da1a6.html#ab0e0dc2172d3fab6390670acb68da1a6">getDurability</a>(),</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                adjustValue.getDurability()));</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        baseValue.<a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ab134287bfbdfe703501697c5f9eac50b.html#ab134287bfbdfe703501697c5f9eac50b">setQuality</a>(Math.max(baseValue.<a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ae48fee1252f685c6ce2033bb855d13e1.html#ae48fee1252f685c6ce2033bb855d13e1">getQuality</a>(),</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;                adjustValue.getQuality()));</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    }</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="comment">/* ----- Task derivation in LocalRules and SyllogisticRules ----- */</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac3df7e788b7a6e2b348d2ae7da7936c5.html#ac3df7e788b7a6e2b348d2ae7da7936c5">  248</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac3df7e788b7a6e2b348d2ae7da7936c5.html#ac3df7e788b7a6e2b348d2ae7da7936c5">forward</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">budgetInference</a>(<a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(truth), 1, memory);</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    }</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div>
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a62ee0953b7880e2547458aa575e14161.html#a62ee0953b7880e2547458aa575e14161">  261</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a62ee0953b7880e2547458aa575e14161.html#a62ee0953b7880e2547458aa575e14161">backward</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">budgetInference</a>(<a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(truth), 1, memory);</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    }</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div>
<div class="line"><a name="l00274"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a90343f7d4de3a6ffcd57493b7a09376f.html#a90343f7d4de3a6ffcd57493b7a09376f">  274</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a90343f7d4de3a6ffcd57493b7a09376f.html#a90343f7d4de3a6ffcd57493b7a09376f">backwardWeak</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">budgetInference</a>(<a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(1) * <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(truth), 1, memory);</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    }</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    <span class="comment">/* ----- Task derivation in CompositionalRules and StructuralRules ----- */</span></div>
<div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a74ebb7970c0561c3407df43a68bbfe84.html#a74ebb7970c0561c3407df43a68bbfe84">  290</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a74ebb7970c0561c3407df43a68bbfe84.html#a74ebb7970c0561c3407df43a68bbfe84">compoundForward</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth, <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> content,</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;            <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">budgetInference</a>(<a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(truth), content.<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a.html#ae14632d1d25bcde8d6698ea0b58eb19a">getComplexity</a>(),</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;                memory);</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    }</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;</div>
<div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_af265e1c35a90581edc7b7e669e55ebf7.html#af265e1c35a90581edc7b7e669e55ebf7">  305</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_af265e1c35a90581edc7b7e669e55ebf7.html#af265e1c35a90581edc7b7e669e55ebf7">compoundBackward</a>(<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> content, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">budgetInference</a>(1, content.<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a.html#ae14632d1d25bcde8d6698ea0b58eb19a">getComplexity</a>(), memory);</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    }</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div>
<div class="line"><a name="l00318"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a4931faf5a49d0822e34b509c4c57f277.html#a4931faf5a49d0822e34b509c4c57f277">  318</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a4931faf5a49d0822e34b509c4c57f277.html#a4931faf5a49d0822e34b509c4c57f277">compoundBackwardWeak</a>(<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> content, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">budgetInference</a>(<a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(1), content.<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a.html#ae14632d1d25bcde8d6698ea0b58eb19a">getComplexity</a>(), memory);</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    }</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;</div>
<div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">  333</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">budgetInference</a>(<span class="keywordtype">float</span> qual, <span class="keywordtype">int</span> complexity,</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;            <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        <a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item.html">Item</a> t = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_ab9958cfc601557bc69b0cd9c89f58cf0.html#ab9958cfc601557bc69b0cd9c89f58cf0">getCurrentTaskLink</a>();</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="keywordflow">if</span> (t == null)</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;            t = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">getCurrentTask</a>();</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        <span class="keywordtype">float</span> priority = t.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>();</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        <span class="keywordtype">float</span> durability = t.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">getDurability</a>();</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="keywordtype">float</span> quality = (float) (qual / Math.sqrt(complexity));</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;        <a class="code" href="../../d4/d8b/classnars_1_1entity_1_1TermLink.html">TermLink</a> bLink = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_afb74806ef37665d392a86dce2e3c6546.html#afb74806ef37665d392a86dce2e3c6546">getCurrentBeliefLink</a>();</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="keywordflow">if</span> (bLink != null) {</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;            priority = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d.html#a8abd4e228bb1ac62df2efdf4487ff34d">aveAri</a>(priority, bLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>());</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;            durability = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d.html#a8abd4e228bb1ac62df2efdf4487ff34d">aveAri</a>(durability, bLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">getDurability</a>());</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;            bLink.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a9324e448bf1bc9f45c3b8e189450a1bf.html#a9324e448bf1bc9f45c3b8e189450a1bf">incPriority</a>(quality);</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        }</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a>(<a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(priority, quality),</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;                <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(durability, quality), quality);</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    }</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;}</div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_ab134287bfbdfe703501697c5f9eac50b_html_ab134287bfbdfe703501697c5f9eac50b"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ab134287bfbdfe703501697c5f9eac50b.html#ab134287bfbdfe703501697c5f9eac50b">nars.entity.BudgetValue.setQuality</a></div><div class="ttdeci">void setQuality(float v)</div><div class="ttdoc">Change quality value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00156">BudgetValue.java:156</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0_html_aeda0763b2c90f6fef3f23b9b4d3d68f0"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0.html#aeda0763b2c90f6fef3f23b9b4d3d68f0">nars.entity.Item.setPriority</a></div><div class="ttdeci">void setPriority(float v)</div><div class="ttdoc">Set priority value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00098">Item.java:98</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9_html_a9f69b4fef64c81abad21404946cd41f9"><div class="ttname"><a href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">nars.entity.Sentence.getTruth</a></div><div class="ttdeci">TruthValue getTruth()</div><div class="ttdoc">Get the truth value of the sentence. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d1c/Sentence_8java_source.html#l00165">Sentence.java:165</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_ad2933ccc8d786f0cea9d8f561814cbf9_html_ad2933ccc8d786f0cea9d8f561814cbf9"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ad2933ccc8d786f0cea9d8f561814cbf9.html#ad2933ccc8d786f0cea9d8f561814cbf9">nars.inference.BudgetFunctions.solutionEval</a></div><div class="ttdeci">static BudgetValue solutionEval(Sentence problem, Sentence solution, Task task, Memory memory)</div><div class="ttdoc">Evaluate the quality of a belief as a solution to a problem, then reward the belief and de-prioritize...</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00081">BudgetFunctions.java:81</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_ae48fee1252f685c6ce2033bb855d13e1_html_ae48fee1252f685c6ce2033bb855d13e1"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ae48fee1252f685c6ce2033bb855d13e1.html#ae48fee1252f685c6ce2033bb855d13e1">nars.entity.BudgetValue.getQuality</a></div><div class="ttdeci">float getQuality()</div><div class="ttdoc">Get quality value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00148">BudgetValue.java:148</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a62ee0953b7880e2547458aa575e14161_html_a62ee0953b7880e2547458aa575e14161"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a62ee0953b7880e2547458aa575e14161.html#a62ee0953b7880e2547458aa575e14161">nars.inference.BudgetFunctions.backward</a></div><div class="ttdeci">static BudgetValue backward(TruthValue truth, Memory memory)</div><div class="ttdoc">Backward inference result and adjustment, stronger case. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00261">BudgetFunctions.java:261</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a90343f7d4de3a6ffcd57493b7a09376f_html_a90343f7d4de3a6ffcd57493b7a09376f"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a90343f7d4de3a6ffcd57493b7a09376f.html#a90343f7d4de3a6ffcd57493b7a09376f">nars.inference.BudgetFunctions.backwardWeak</a></div><div class="ttdeci">static BudgetValue backwardWeak(TruthValue truth, Memory memory)</div><div class="ttdoc">Backward inference result and adjustment, weaker case. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00274">BudgetFunctions.java:274</a></div></div>
<div class="ttc" id="namespacenars_1_1entity_html"><div class="ttname"><a href="../../db/dec/namespacenars_1_1entity.html">nars.entity</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00021">BudgetValue.java:21</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61_html_a9eac33f2495441c77911a8581a5bbe61"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">nars.entity.TruthValue.getFrequency</a></div><div class="ttdeci">float getFrequency()</div><div class="ttdoc">Get the frequency value. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00061">TruthValue.java:61</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a4931faf5a49d0822e34b509c4c57f277_html_a4931faf5a49d0822e34b509c4c57f277"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a4931faf5a49d0822e34b509c4c57f277.html#a4931faf5a49d0822e34b509c4c57f277">nars.inference.BudgetFunctions.compoundBackwardWeak</a></div><div class="ttdeci">static BudgetValue compoundBackwardWeak(Term content, Memory memory)</div><div class="ttdoc">Backward inference with CompoundTerm conclusion, weaker case. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00318">BudgetFunctions.java:318</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_afb74806ef37665d392a86dce2e3c6546_html_afb74806ef37665d392a86dce2e3c6546"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_afb74806ef37665d392a86dce2e3c6546.html#afb74806ef37665d392a86dce2e3c6546">nars.storage.Memory.getCurrentBeliefLink</a></div><div class="ttdeci">TermLink getCurrentBeliefLink()</div><div class="ttdoc">The selected TermLink. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00636">Memory.java:636</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a_html_ae14632d1d25bcde8d6698ea0b58eb19a"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a.html#ae14632d1d25bcde8d6698ea0b58eb19a">nars.language.Term.getComplexity</a></div><div class="ttdeci">int getComplexity()</div><div class="ttdoc">The syntactic complexity, for constant automic Term, is 1. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00128">Term.java:128</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Stamp_a316ac8d258c291cb941e50f17c2dc0eb_html_a316ac8d258c291cb941e50f17c2dc0eb"><div class="ttname"><a href="../../d1/d1e/classnars_1_1entity_1_1Stamp_a316ac8d258c291cb941e50f17c2dc0eb.html#a316ac8d258c291cb941e50f17c2dc0eb">nars.entity.Stamp.length</a></div><div class="ttdeci">int length()</div><div class="ttdoc">Return the baseLength of the evidentialBase. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d4f/Stamp_8java_source.html#l00154">Stamp.java:154</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TermLink_html"><div class="ttname"><a href="../../d4/d8b/classnars_1_1entity_1_1TermLink.html">nars.entity.TermLink</a></div><div class="ttdoc">A link between a compound term and a component term. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/daa/TermLink_8java_source.html#l00038">TermLink.java:38</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_a088e64163126211239b6afd25a9cdca3_html_a088e64163126211239b6afd25a9cdca3"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_a088e64163126211239b6afd25a9cdca3.html#a088e64163126211239b6afd25a9cdca3">nars.entity.BudgetValue.incPriority</a></div><div class="ttdeci">void incPriority(float v)</div><div class="ttdoc">Increase priority value by a percentage of the remaining range. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00100">BudgetValue.java:100</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_html"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item.html">nars.entity.Item</a></div><div class="ttdoc">An item is an object that can be put into a Bag, to participate in the resource competition of the sy...</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00031">Item.java:31</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_html"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory.html">nars.storage.Memory</a></div><div class="ttdoc">The memory of the system. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00051">Memory.java:51</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Sentence_ac0ed749c50e55120d5b63219ed7eb082_html_ac0ed749c50e55120d5b63219ed7eb082"><div class="ttname"><a href="../../d6/d25/classnars_1_1entity_1_1Sentence_ac0ed749c50e55120d5b63219ed7eb082.html#ac0ed749c50e55120d5b63219ed7eb082">nars.entity.Sentence.getStamp</a></div><div class="ttdeci">Stamp getStamp()</div><div class="ttdoc">Get the stamp of the sentence. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d1c/Sentence_8java_source.html#l00173">Sentence.java:173</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508_html_a26eda4f00b333b706b4e3d069fdf1508"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">nars.storage.Memory.getCurrentTask</a></div><div class="ttdeci">Task getCurrentTask()</div><div class="ttdoc">The selected Task. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00625">Memory.java:625</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_af265e1c35a90581edc7b7e669e55ebf7_html_af265e1c35a90581edc7b7e669e55ebf7"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_af265e1c35a90581edc7b7e669e55ebf7.html#af265e1c35a90581edc7b7e669e55ebf7">nars.inference.BudgetFunctions.compoundBackward</a></div><div class="ttdeci">static BudgetValue compoundBackward(Term content, Memory memory)</div><div class="ttdoc">Backward inference with CompoundTerm conclusion, stronger case. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00305">BudgetFunctions.java:305</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_ab72bce41fd8a1512fc8baa07ed93fc1b_html_ab72bce41fd8a1512fc8baa07ed93fc1b"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ab72bce41fd8a1512fc8baa07ed93fc1b.html#ab72bce41fd8a1512fc8baa07ed93fc1b">nars.entity.BudgetValue.setDurability</a></div><div class="ttdeci">void setDurability(float v)</div><div class="ttdoc">Change durability value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00124">BudgetValue.java:124</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7_html_a97b35888ceaad90e7a428701051c51d7"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">nars.entity.Item.getPriority</a></div><div class="ttdeci">float getPriority()</div><div class="ttdoc">Get priority value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00090">Item.java:90</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_ac61e534f9a09e5584eb90c0e915e72ff_html_ac61e534f9a09e5584eb90c0e915e72ff"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac61e534f9a09e5584eb90c0e915e72ff.html#ac61e534f9a09e5584eb90c0e915e72ff">nars.inference.BudgetFunctions.update</a></div><div class="ttdeci">static BudgetValue update(Task task, TruthValue bTruth)</div><div class="ttdoc">Update a belief. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00150">BudgetFunctions.java:150</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Task_html"><div class="ttname"><a href="../../dc/ddc/classnars_1_1entity_1_1Task.html">nars.entity.Task</a></div><div class="ttdoc">A task to be processed, consists of a Sentence and a BudgetValue. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d10/Task_8java_source.html#l00035">Task.java:35</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Task_ab140cb553a6cf40b07093d1df283567f_html_ab140cb553a6cf40b07093d1df283567f"><div class="ttname"><a href="../../dc/ddc/classnars_1_1entity_1_1Task_ab140cb553a6cf40b07093d1df283567f.html#ab140cb553a6cf40b07093d1df283567f">nars.entity.Task.getSentence</a></div><div class="ttdeci">Sentence getSentence()</div><div class="ttdoc">Get the sentence. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d10/Task_8java_source.html#l00099">Task.java:99</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_a630c30728ee404b76262610260d0a82a_html_a630c30728ee404b76262610260d0a82a"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a630c30728ee404b76262610260d0a82a.html#a630c30728ee404b76262610260d0a82a">nars.entity.TruthValue.getExpDifAbs</a></div><div class="ttdeci">float getExpDifAbs(TruthValue t)</div><div class="ttdoc">Calculate the absolute difference of the expectation value and that of a given truth value...</div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00086">TruthValue.java:86</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_html"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept.html">nars.entity.Concept</a></div><div class="ttdoc">A concept contains information associated with a term, including directly and indirectly related task...</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00047">Concept.java:47</a></div></div>
<div class="ttc" id="namespacenars_1_1storage_html"><div class="ttname"><a href="../../de/ddc/namespacenars_1_1storage.html">nars.storage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d6/dce/Bag_8java_source.html#l00021">Bag.java:21</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_ac5e336432ebc7744461334f04bfd5216_html_ac5e336432ebc7744461334f04bfd5216"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac5e336432ebc7744461334f04bfd5216.html#ac5e336432ebc7744461334f04bfd5216">nars.inference.BudgetFunctions.revise</a></div><div class="ttdeci">static BudgetValue revise(TruthValue tTruth, TruthValue bTruth, TruthValue truth, boolean feedbackToLinks, Memory memory)</div><div class="ttdoc">Evaluate the quality of a revision, then de-prioritize the premises. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00118">BudgetFunctions.java:118</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_ab0e0dc2172d3fab6390670acb68da1a6_html_ab0e0dc2172d3fab6390670acb68da1a6"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue_ab0e0dc2172d3fab6390670acb68da1a6.html#ab0e0dc2172d3fab6390670acb68da1a6">nars.entity.BudgetValue.getDurability</a></div><div class="ttdeci">float getDurability()</div><div class="ttdoc">Get durability value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00116">BudgetValue.java:116</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_ac83323d74841f32ec33ebb1c374d85cc_html_ac83323d74841f32ec33ebb1c374d85cc"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_ac83323d74841f32ec33ebb1c374d85cc.html#ac83323d74841f32ec33ebb1c374d85cc">nars.entity.Item.decPriority</a></div><div class="ttdeci">void decPriority(float v)</div><div class="ttdoc">Decrease priority value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00114">Item.java:114</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a74ebb7970c0561c3407df43a68bbfe84_html_a74ebb7970c0561c3407df43a68bbfe84"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a74ebb7970c0561c3407df43a68bbfe84.html#a74ebb7970c0561c3407df43a68bbfe84">nars.inference.BudgetFunctions.compoundForward</a></div><div class="ttdeci">static BudgetValue compoundForward(TruthValue truth, Term content, Memory memory)</div><div class="ttdoc">Forward inference with CompoundTerm conclusion. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00290">BudgetFunctions.java:290</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1LocalRules_html"><div class="ttname"><a href="../../d4/de9/classnars_1_1inference_1_1LocalRules.html">nars.inference.LocalRules</a></div><div class="ttdoc">Directly process a task by a oldBelief, with only two Terms in both. </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/db7/LocalRules_8java_source.html#l00038">LocalRules.java:38</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03_html_a35ac262407303cdf8d11f7892f9a3a03"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">nars.inference.UtilityFunctions.and</a></div><div class="ttdeci">static float and(float...arr)</div><div class="ttdoc">A function where the output is conjunctively determined by the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00035">UtilityFunctions.java:35</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_html"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions.html">nars.inference.UtilityFunctions</a></div><div class="ttdoc">Common functions on real numbers, mostly in [0,1]. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00028">UtilityFunctions.java:28</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91_html_a5797bd2ee147531f4200cf66c7392a91"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">nars.inference.BudgetFunctions.truthToQuality</a></div><div class="ttdeci">static float truthToQuality(TruthValue t)</div><div class="ttdoc">Determine the quality of a judgment by its truth value alone. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00043">BudgetFunctions.java:43</a></div></div>
<div class="ttc" id="namespacenars_html"><div class="ttname"><a href="../../d7/d81/namespacenars.html">nars</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TaskLink_html"><div class="ttname"><a href="../../d9/d27/classnars_1_1entity_1_1TaskLink.html">nars.entity.TaskLink</a></div><div class="ttdoc">Reference to a Task. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/dce/TaskLink_8java_source.html#l00032">TaskLink.java:32</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2_html_a24093a77b49f21322e62c9bed7ff5ee2"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">nars.inference.UtilityFunctions.or</a></div><div class="ttdeci">static float or(float...arr)</div><div class="ttdoc">A function where the output is disjunctively determined by the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00048">UtilityFunctions.java:48</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Sentence_html"><div class="ttname"><a href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">nars.entity.Sentence</a></div><div class="ttdoc">A Sentence is an abstract class, mainly containing a Term, a TruthValue, and a Stamp. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d1c/Sentence_8java_source.html#l00031">Sentence.java:31</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c_html_a6c265160b143d73da5433f3d5464b59c"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a6c265160b143d73da5433f3d5464b59c.html#a6c265160b143d73da5433f3d5464b59c">nars.inference.BudgetFunctions.budgetInference</a></div><div class="ttdeci">static BudgetValue budgetInference(float qual, int complexity, Memory memory)</div><div class="ttdoc">Common processing for all inference step. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00333">BudgetFunctions.java:333</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d_html_a8abd4e228bb1ac62df2efdf4487ff34d"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d.html#a8abd4e228bb1ac62df2efdf4487ff34d">nars.inference.UtilityFunctions.aveAri</a></div><div class="ttdeci">static float aveAri(float...arr)</div><div class="ttdoc">A function where the output is the arithmetic average the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00061">UtilityFunctions.java:61</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a7221f4c81db92f40535cffb7f8941b3c_html_a7221f4c81db92f40535cffb7f8941b3c"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a7221f4c81db92f40535cffb7f8941b3c.html#a7221f4c81db92f40535cffb7f8941b3c">nars.inference.BudgetFunctions.forget</a></div><div class="ttdeci">static void forget(BudgetStruct budget, float forgetRate, float relativeThreshold)</div><div class="ttdoc">Decrease Priority after an item is used, called in Bag. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00211">BudgetFunctions.java:211</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee_html_adbb21c1891722e30c1d6cfaf5fee18ee"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">nars.entity.Item.getDurability</a></div><div class="ttdeci">float getDurability()</div><div class="ttdoc">Get durability value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00122">Item.java:122</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_ac3df7e788b7a6e2b348d2ae7da7936c5_html_ac3df7e788b7a6e2b348d2ae7da7936c5"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_ac3df7e788b7a6e2b348d2ae7da7936c5.html#ac3df7e788b7a6e2b348d2ae7da7936c5">nars.inference.BudgetFunctions.forward</a></div><div class="ttdeci">static BudgetValue forward(TruthValue truth, Memory memory)</div><div class="ttdoc">Forward inference result and adjustment. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00248">BudgetFunctions.java:248</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a7649e37bb61cac9b8a2601fdff3a5f7a_html_a7649e37bb61cac9b8a2601fdff3a5f7a"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a7649e37bb61cac9b8a2601fdff3a5f7a.html#a7649e37bb61cac9b8a2601fdff3a5f7a">nars.inference.UtilityFunctions.aveGeo</a></div><div class="ttdeci">static float aveGeo(float...arr)</div><div class="ttdoc">A function where the output is the geometric average the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00074">UtilityFunctions.java:74</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_html"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">nars.inference.BudgetFunctions</a></div><div class="ttdoc">Budget functions for resources allocation. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00031">BudgetFunctions.java:31</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_html"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">nars.entity.TruthValue</a></div><div class="ttdoc">Frequency and confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00028">TruthValue.java:28</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_acf3c7af84e64586a6b1d549f02bfeead_html_acf3c7af84e64586a6b1d549f02bfeead"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_acf3c7af84e64586a6b1d549f02bfeead.html#acf3c7af84e64586a6b1d549f02bfeead">nars.entity.Concept.getQuality</a></div><div class="ttdeci">float getQuality()</div><div class="ttdoc">Recalculate the quality of the concept [to be refined to show extension/intension balance]...</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00362">Concept.java:362</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a4761275e8e265c669dc539af3e15eef8_html_a4761275e8e265c669dc539af3e15eef8"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a4761275e8e265c669dc539af3e15eef8.html#a4761275e8e265c669dc539af3e15eef8">nars.entity.Item.decDurability</a></div><div class="ttdeci">void decDurability(float v)</div><div class="ttdoc">Decrease durability value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00146">Item.java:146</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a686c257308a15eba9458a438cc60227a_html_a686c257308a15eba9458a438cc60227a"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a686c257308a15eba9458a438cc60227a.html#a686c257308a15eba9458a438cc60227a">nars.entity.Item.setQuality</a></div><div class="ttdeci">void setQuality(float v)</div><div class="ttdoc">Set quality value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00162">Item.java:162</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Sentence_a7d95d60caaf4c895559182a7eb2ff71e_html_a7d95d60caaf4c895559182a7eb2ff71e"><div class="ttname"><a href="../../d6/d25/classnars_1_1entity_1_1Sentence_a7d95d60caaf4c895559182a7eb2ff71e.html#a7d95d60caaf4c895559182a7eb2ff71e">nars.entity.Sentence.isJudgment</a></div><div class="ttdeci">boolean isJudgment()</div><div class="ttdoc">Distinguish Judgment from Goal ("instanceof Judgment" doesn&#39;t work) </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d1c/Sentence_8java_source.html#l00181">Sentence.java:181</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_html"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term.html">nars.language.Term</a></div><div class="ttdoc">Term is the basic component of Narsese, and the object of processing in NARS. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00040">Term.java:40</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_ab9958cfc601557bc69b0cd9c89f58cf0_html_ab9958cfc601557bc69b0cd9c89f58cf0"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_ab9958cfc601557bc69b0cd9c89f58cf0.html#ab9958cfc601557bc69b0cd9c89f58cf0">nars.storage.Memory.getCurrentTaskLink</a></div><div class="ttdeci">TaskLink getCurrentTaskLink()</div><div class="ttdoc">The selected TaskLink. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00614">Memory.java:614</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a5c7290e12cda0925b936c07ed7b806f3_html_a5c7290e12cda0925b936c07ed7b806f3"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5c7290e12cda0925b936c07ed7b806f3.html#a5c7290e12cda0925b936c07ed7b806f3">nars.inference.BudgetFunctions.rankBelief</a></div><div class="ttdeci">static float rankBelief(Sentence judg)</div><div class="ttdoc">Determine the rank of a judgment by its confidence and originality (stamp length) ...</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00057">BudgetFunctions.java:57</a></div></div>
<div class="ttc" id="namespacenars_1_1language_html"><div class="ttname"><a href="../../d0/d72/namespacenars_1_1language.html">nars.language</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00021">CompoundTerm.java:21</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2_html_a957a91e3b91d4a4043c3959838c370f2"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">nars.inference.UtilityFunctions.w2c</a></div><div class="ttdeci">static float w2c(float w)</div><div class="ttdoc">A function to convert weight to confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00087">UtilityFunctions.java:87</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a9324e448bf1bc9f45c3b8e189450a1bf_html_a9324e448bf1bc9f45c3b8e189450a1bf"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a9324e448bf1bc9f45c3b8e189450a1bf.html#a9324e448bf1bc9f45c3b8e189450a1bf">nars.entity.Item.incPriority</a></div><div class="ttdeci">void incPriority(float v)</div><div class="ttdoc">Increase priority value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00106">Item.java:106</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c_html_a68ca7d92e9ea20d2a9a9f578ad7b681c"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">nars.entity.TruthValue.getConfidence</a></div><div class="ttdeci">float getConfidence()</div><div class="ttdoc">Get the confidence value. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00069">TruthValue.java:69</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_aabac530761ea7ac0f43f0d1ea8d085c8_html_aabac530761ea7ac0f43f0d1ea8d085c8"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_aabac530761ea7ac0f43f0d1ea8d085c8.html#aabac530761ea7ac0f43f0d1ea8d085c8">nars.inference.BudgetFunctions.activate</a></div><div class="ttdeci">static void activate(Concept concept, BudgetStruct budget)</div><div class="ttdoc">Activate a concept by an incoming TaskLink. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00183">BudgetFunctions.java:183</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_html"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">nars.entity.BudgetValue</a></div><div class="ttdoc">A triple of priority (current), durability (decay), and quality (long-term average). </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00031">BudgetValue.java:31</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a64bec0b466ef31bc3150de23f0623309_html_a64bec0b466ef31bc3150de23f0623309"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a64bec0b466ef31bc3150de23f0623309.html#a64bec0b466ef31bc3150de23f0623309">nars.inference.BudgetFunctions.merge</a></div><div class="ttdeci">static void merge(BudgetValue baseValue, BudgetStruct adjustValue)</div><div class="ttdoc">Merge an item into another one in a bag, when the two are identical except in budget values...</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00232">BudgetFunctions.java:232</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1LocalRules_a91eadfda9f647cd8e799b4f982e14fca_html_a91eadfda9f647cd8e799b4f982e14fca"><div class="ttname"><a href="../../d4/de9/classnars_1_1inference_1_1LocalRules_a91eadfda9f647cd8e799b4f982e14fca.html#a91eadfda9f647cd8e799b4f982e14fca">nars.inference.LocalRules.solutionQuality</a></div><div class="ttdeci">static float solutionQuality(Sentence problem, Sentence solution)</div><div class="ttdoc">Evaluate the quality of the judgment as a solution to a problem. </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/db7/LocalRules_8java_source.html#l00148">LocalRules.java:148</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a9c5299387c81abfc7a7c6fbf72febdc3_html_a9c5299387c81abfc7a7c6fbf72febdc3"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a9c5299387c81abfc7a7c6fbf72febdc3.html#a9c5299387c81abfc7a7c6fbf72febdc3">nars.inference.BudgetFunctions.distributeAmongLinks</a></div><div class="ttdeci">static BudgetValue distributeAmongLinks(BudgetStruct b, int n)</div><div class="ttdoc">Distribute the budget of a task among the links to it. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00169">BudgetFunctions.java:169</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a0f27e5a39dc50b5f108732f59199db22_html_a0f27e5a39dc50b5f108732f59199db22"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a0f27e5a39dc50b5f108732f59199db22.html#a0f27e5a39dc50b5f108732f59199db22">nars.entity.Item.setDurability</a></div><div class="ttdeci">void setDurability(float v)</div><div class="ttdoc">Set durability value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00130">Item.java:130</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_ed82ebcd34e530b246c6fd9032262140.html">aruntime</a></li><li class="navelem"><a class="el" href="../../dir_19496ddff8e6c0f2b6654287ecb1a472.html">src</a></li><li class="navelem"><a class="el" href="../../dir_db9c5934f797909f7296c2c2017f7fc9.html">main</a></li><li class="navelem"><a class="el" href="../../dir_6d74390eb6d6287951075e525bcb9bed.html">java</a></li><li class="navelem"><a class="el" href="../../dir_51a24984472456d47100350cd31f9a7c.html">nars</a></li><li class="navelem"><a class="el" href="../../dir_ee323373cf7c53e5489dea03632cbb1d.html">inference</a></li><li class="navelem"><a class="el" href="../../de/d4e/BudgetFunctions_8java.html">BudgetFunctions.java</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:58 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
